// This file is part of Indico.
// Copyright (C) 2002 - 2025 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.

@use 'base' as *;
@use 'partials/boxes' as *;

.rule-list {
  list-style-type: none;
  padding-left: 0;

  .rule {
    @extend .flexrow;
    margin-top: 1em;

    .rule-condition {
      @extend .flexrow;
      margin-right: 1em;

      label {
        line-height: 2.5em;
        margin-right: 0.2em;
        display: block;
        white-space: nowrap;
        vertical-align: middle;
      }

      select:invalid {
        color: gray;
      }
    }

    .rule-remove-button {
      align-self: center;
    }
  }
}

#email-template-manager {
  max-width: 800px;

  .email-template-wrapper {
    padding: 0 0 1em 1em;

    .explanation {
      color: $light-black;
    }

    .email-templates {
      width: 800px;
      max-height: 800px;
      overflow: auto;

      > ul {
        list-style-type: none;
        padding-left: 0;
        padding-right: 20px;

        > li {
          width: 775px;
        }
      }
    }

    .email-preview {
      display: none;

      .email-subject {
        padding-bottom: 10px;
      }

      .email-body {
        color: $light-black;
      }
    }

    .regform-section-sortable-placeholder {
      @extend .i-box;
      @include border-all($style: dashed);
      box-shadow: none;

      background-color: $light-gray;
    }

    .email-preview-btn {
      padding-right: 5px;
      color: $link;

      &:hover {
        color: $bright-orange;
      }
    }

    .stop-processing-enabled {
      color: $red !important;

      &.disabled {
        cursor: default;
      }
    }
  }
}

#form-group-rules {
  margin-top: 0;

  .form-field,
  .rule-condition[data-condition='track'] select {
    width: 100%;
  }

  .rule-list {
    width: 700px;
  }
}
